package com.netty.modbus.constants;

/**
 * description: Constants <br>
 * date: 2021/9/29 15:44 <br>
 * @author: lwy <br>
 * version: 1.0 <br>
 */
public class Constants {
    public static final int NUM_7 = 7;


    /**
     * 功能码
     * 0x74: 注册设备
     * 0x93: 对时
     * 0x89: 上传时报警设定值
     * 0x92: 数据主动上传
     */
    public class RtuFunction {
        /**
         *74: 注册设备
         */
        public static final String CODE_1 = "74";

        /**
         *byte: 注册设备
         */
        public static final byte COMMAND_1 = 116;
        /**
         * 0x93: 对时
         */
        public static final String CODE_2= "93";

        /**
         *byte: 对时
         */
        public static final byte COMMAND_2 = -109;
        /**
         * 0x89: 上传时报警设定值
         */
        public static final String CODE_3 = "89";

        /**
         *byte: 上传时报警设定值
         */
        public static final byte COMMAND_3 = -119;

        /**
         * 数据主动上传
         * */
        public static final String CODE_4 = "92";

        /**
         *byte: 数据主动上传
         */
        public static final byte COMMAND_4 = -110;

        /**
         * 服务端透传命令读取指定字节
         * */
        public static final String CODE_5 = "90";

        /**
         *byte: 数据主动上传
         */
        public static final byte COMMAND_5 = -112;

    }


}
